home *** CD-ROM | disk | FTP | other *** search
/ US Department of Defense…ndamentals 1.0 2004 April / US Department of Defense: Firewall & Router Fundamentals 1.0 2004 April.iso / sco / interface / map.swf / scripts / frame_3 / DoAction_3.as < prev    next >
Encoding:
Text File  |  2004-03-29  |  2.7 KB  |  87 lines

  1. function initialize()
  2. {
  3.    var _loc1_ = _root;
  4.    s = 0;
  5.    x = 0;
  6.    while(x < mod_data.length)
  7.    {
  8.       temp_status = 0;
  9.       _loc1_["m" + (x + 1)].gotoAndStop("module_c");
  10.       _loc1_["m" + (x + 1)].description = mod_data[x][0];
  11.       if(s + 1 >= 10)
  12.       {
  13.          _loc1_["m" + (x + 1)].sco = "sco0" + (s + 1);
  14.          _loc1_["m" + (x + 1)].sco_num = s + 1;
  15.       }
  16.       else
  17.       {
  18.          _loc1_["m" + (x + 1)].sco = "sco00" + (s + 1);
  19.          _loc1_["m" + (x + 1)].sco_num = s + 1;
  20.       }
  21.       i = 1;
  22.       while(i < mod_data[x].length)
  23.       {
  24.          _loc1_["m" + (x + 1) + "_t" + i].gotoAndStop("topic_c");
  25.          _loc1_["m" + (x + 1) + "_t" + i].description = mod_data[x][i];
  26.          _loc1_["m" + (x + 1) + "_t" + i].indicator.gotoAndStop(course_status_array[s]);
  27.          if(s + 1 >= 10)
  28.          {
  29.             _loc1_["m" + (x + 1) + "_t" + i].sco = "sco0" + (s + 1);
  30.             _loc1_["m" + (x + 1) + "_t" + i].sco_num = s + 1;
  31.          }
  32.          else
  33.          {
  34.             _loc1_["m" + (x + 1) + "_t" + i].sco = "sco00" + (s + 1);
  35.             _loc1_["m" + (x + 1) + "_t" + i].sco_num = s + 1;
  36.          }
  37.          switch(course_status_array[s])
  38.          {
  39.             case "n":
  40.                temp_status += 0;
  41.                break;
  42.             case "i":
  43.                temp_status += 50;
  44.                break;
  45.             case "c":
  46.                temp_status += 100;
  47.          }
  48.          s++;
  49.          i++;
  50.       }
  51.       if(temp_status == 0)
  52.       {
  53.          _loc1_["m" + (x + 1)].indicator.gotoAndStop("n");
  54.       }
  55.       if(temp_status > 0 && temp_status < (mod_data[x].length - 1) * 100)
  56.       {
  57.          _loc1_["m" + (x + 1)].indicator.gotoAndStop("i");
  58.       }
  59.       if(temp_status == (mod_data[x].length - 1) * 100)
  60.       {
  61.          _loc1_["m" + (x + 1)].indicator.gotoAndStop("c");
  62.       }
  63.       x++;
  64.    }
  65.    if(Number(_loc1_.current_topic) <= 1)
  66.    {
  67.       _loc1_.m1.selected.gotoAndStop("g_tour");
  68.       _level0.current_module = 0;
  69.    }
  70.    if(Number(_loc1_.current_topic) >= 2 && Number(_loc1_.current_topic) <= 4)
  71.    {
  72.       _loc1_["m2_t" + (Number(_loc1_.current_topic) - 1)].selected.gotoAndStop("on");
  73.       _level0.current_module = 1;
  74.    }
  75.    if(Number(_loc1_.current_topic) > 4 && Number(_loc1_.current_topic) <= 8)
  76.    {
  77.       _loc1_["m3_t" + (Number(_loc1_.current_topic) - 4)].selected.gotoAndStop("on");
  78.       _level0.current_module = 2;
  79.    }
  80.    if(Number(_loc1_.current_topic) > 8 && Number(_loc1_.current_topic) <= 12)
  81.    {
  82.       _loc1_["m4_t" + (Number(_loc1_.current_topic) - 8)].selected.gotoAndStop("on");
  83.       _level0.current_module = 3;
  84.    }
  85.    _level0.current_sco = Number(_loc1_.current_topic);
  86. }
  87.